package inabit.agent;
/**@author Rafael Rocha*/
public abstract class Actuator{

	private String id;
	private boolean executing;
	public Actuator(String id) {
		this.id = id;
		executing = false;
	}
	
	public String getID() {
		return this.id;
	}
	/**represents the action to be executed by the agent*/
	protected abstract void action(String... params);
	
	/**Executes the action method passing the parameters and updating the state of
	 * the actuator to alive*/
	public void execute(String... params){
		executing = true;
		action(params);
		executing = false;
	}
	/**Returns true if the actuator is on execution*/
	public boolean isAlive() {
		return executing;
	}
}
